home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- function trim(theNumber, decPlaces)
- {
- if(decPlaces >= 0)
- {
- var temp = Math.pow(10,decPlaces);
- return Math.round(theNumber * temp) / temp;
- }
- }
- distance = int(Math.sqrt(Math.pow(_parent.lander._x - _parent.foreground._x,2) + Math.pow(_parent.lander._y - _parent.foreground._y,2)) - 709);
- if(go != "stop" && myTime != 0)
- {
- timer = myTime - trim((getTimer() - myTimerStart) / 1000,2);
- if(0 >= timer)
- {
- _parent.popup.gotoAndStop("notime");
- _parent.lander.myLanded = "stop";
- go = "stop";
- }
- }
- if(-10 >= _parent.Angry.distance)
- {
- _parent.lander.exploding = "true";
- _parent.lander.myLanded = "blow";
- }
- }
-